package cn.leaf.factory;

/**
*
 * description: 抽象工厂测试类
 *
 * Spring框架中的应用：
 * BeanFactory是一种抽象工厂模式的体现，它将对象的创建和依赖关系的处理分离，使得应用程序更加灵活和可扩展。
 * ------------------------------------------------------------------------------------
 * Jdk中的应用：
 * java.sql.Connection
 * -------------------
 * @author twinkle leaf
 * @version v1.0.0
 * @since 2021-07-14 23:40:25
 *
*/
public class Test {
    public static void main(String[] args) {
        PearlMilkTeaFactory pearlMilkTeaFactory = new PearlMilkTeaFactory();
        Tea tea = pearlMilkTeaFactory.createTea();
        tea.drink();
        Food food = pearlMilkTeaFactory.createFood();
        food.eat();
    }
}
